<?php
require_once 'init.php';

$bought = $_REQUEST['p'];
if (is_array($bought)) {
	$newCart = array();
	foreach ($bought as $product) {
		if (!array_key_exists('del',$product)) {
			$newCart[$product['id']] = $product['amount'];
		}
	}
	$cart = cf\api\cart\set($newCart);
}

$smarty->assign('cart',$cart);

show(
	'cart', 
	'Корзина'
);
?>